import re
str1 = '''
http://www.interoem.com/messageinfo.asp?id=35
http://3995503.com/class/class09/newsshow.asp?id=14
http://lib.wzmc.edu.cn/news/onews.asp?id=769
http://www.zy-ls.com/alfx.asp?newsid=377&id=6
http://www.fincm.com/newslist.asp?id=415
'''
pattern = re.compile(r'http:///?(([\w-]+\.?)+)/')
lists = str1.splitlines()
print(lists)


def get(matched):
    s1 = str(matched.group())
    return str(pattern.findall(s1)[0][0])


for i in range(len(lists)):
    if pattern.match(lists[i]):
        lists[i] = get(pattern.match(lists[i]))


print(lists)
